Skip to content

Fix Dependabot alerts: upgrade Pillow to 13.0.0 and require Python >=3.11 - #382

Merged
alexlib merged 4 commits into
masterfrom
fix/dependabot-pillow
Nov 14, 2026
Merged

alexlib merged 4 commits into
masterfrom
fix/dependabot-pillow

Conversation

@alexlib

@alexlib alexlib commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Upgrades pillow from 12.3.0 to 13.0.0 in poetry.lock to address open Pillow security advisories.
  • Bumps minimum supported Python version from >=3.10 to >=3.11 (required by Pillow 13) and updates classifiers/workflows/docs accordingly.

Why

Dependabot reports multiple open Pillow vulnerabilities (including critical/high) fixed in 13.0.0.

Notes

  • poetry.lock regenerated with Poetry.
  • CI matrices updated to drop Python 3.10.

Summary by Sourcery

Modernize project packaging and dependency management while upgrading Pillow and the supported Python baseline to improve security and maintainability.

New Features:

  • Add grouped weekly Dependabot updates for GitHub Actions, Python, and Rust dependencies.
  • Adopt uv-based development workflows and PEP 621 project metadata with Hatchling packaging.

Bug Fixes:

  • Require Pillow 13.0.0 to address known security vulnerabilities.
  • Correct masked-array validation failures to raise ValueError.

Enhancements:

  • Raise the minimum supported Python version to 3.11 and align package metadata, documentation, CI, and wheel builds with Python 3.11–3.14.

Build:

  • Replace Poetry configuration and legacy setup.py packaging with Hatchling and uv lockfile-based dependency management.

Documentation:

  • Update installation and contributor guidance to use uv and document Python 3.11–3.14 support.

…3.11

Addresses open Pillow security advisories by upgrading to patched version 13.0.0. Pillow 13 requires Python >=3.11, so minimum supported Python version is bumped accordingly and CI/workflows updated.
Copilot AI balanced review requested due to automatic review settings November 14, 2026 20:43
@sourcery-ai

sourcery-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Restore ValueError for invalid masked-array inputs in the image-processing workflows.

  • openpiv/windef.py L241, L655

Configuration

Move project metadata and dependencies to PEP 621 with Hatchling, require Python 3.11+, and declare Pillow 13.0.0 or later.

  • pyproject.toml L1-5, L10-64

Update Dependabot to check GitHub Actions, Python, and Rust dependencies weekly, grouping updates by ecosystem.

  • .github/dependabot.yml L1-32

Drop Python 3.10 from the test matrix and wheel builds to match the new minimum supported version.

  • .github/workflows/testing.yml L12
  • .github/workflows/wheels.yml L44

Remove the Poetry configuration and setuptools setup script as part of the build-system migration.

  • poetry.toml (deleted)
  • setup.py (deleted)

Documentation

Update contributor instructions and project documentation to use uv and reflect Python 3.11+ support.

  • .github/copilot-instructions.md L21-26, L32-35, L119-124 (+4 small edits)
  • INSTALL L43
  • README.md L42-44
  • openpiv/docs/src/developers.rst L78

Lock files and vendored code

Replace the Poetry lockfile with a uv lockfile for the migrated project metadata and dependency set.

  • uv.lock L2-1259
  • poetry.lock (deleted)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Nov 14, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Fixed security issues:

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="pyproject.toml" line_range="32" />
<code_context>

 [tool.poetry.dependencies]
-python = ">=3.10"
+python = ">=3.11"
 numpy = ">=2.0.0"
 imageio = ">=2.35.0"
</code_context>
<issue_to_address>
**Fallback installs retain vulnerable Pillow**

When the package is installed through setuptools or the Conda recipe, `setup.py` and recipe metadata do not consistently enforce the new Python floor or Pillow 13; setuptools can resolve Pillow through ImageIO's weaker requirement, leaving fallback installs on vulnerable Pillow versions.

Update `setup.py` and the Conda recipe to enforce Python >=3.11 and require Pillow >=13.

Also at `pyproject.toml:41`.
</issue_to_address>

### Comment 2
<location path="pyproject.toml" line_range="32" />
<code_context>

 [tool.poetry.dependencies]
-python = ">=3.10"
+python = ">=3.11"
 numpy = ">=2.0.0"
 imageio = ">=2.35.0"
</code_context>
<issue_to_address>
**Supported Python installs fail**

When a user runs uv with Python 3.11, 3.12, or 3.13, `uv.lock` declares `requires-python = ">=3.14"`, so `uv sync` or other locked installs reject interpreters that the project metadata and CI support.

Regenerate `uv.lock` with a compatibility range and dependency resolution that support Python 3.11–3.13.
</issue_to_address>

### Comment 3
<location path=".github/workflows/testing.yml" line_range="12" />
<code_context>
       fail-fast: false
       matrix:
-        python-version: ["3.10", "3.11", "3.12", "3.13"]
+        python-version: ["3.11", "3.12", "3.13", "3.14"]

     steps:
</code_context>
<issue_to_address>
**Python 3.14 locked install fails**

When a user installs the project from `poetry.lock` on Python 3.14, `poetry.lock` pins SciPy 1.13.0 and NumPy 2.2.6, whose locked artifacts do not include Python 3.14 wheels; installing the declared Python 3.14-supported project from the Poetry lock falls back to building these versions from source, and the unsupported SciPy build fails.

Update the locked dependency versions to releases that support Python 3.14 and regenerate the Poetry lockfile.
</issue_to_address>

### Comment 4
<location path=".github/workflows/wheels.yml" line_range="44" />
<code_context>
         with:
           target: ${{ matrix.target }}
-          args: --release --out dist -i python3.10 python3.11 python3.12 python3.13 --manifest-path crates/openpiv_rust/Cargo.toml
+          args: --release --out dist -i python3.11 python3.12 python3.13 python3.14 --manifest-path crates/openpiv_rust/Cargo.toml
           sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
           manylinux: auto
</code_context>
<issue_to_address>
**Rust extra lacks platform wheels**

When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce `cp312`-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.

Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.
</issue_to_address>

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: pyproject.toml:32, pyproject.toml:32, .github/workflows/testing.yml:12, .github/workflows/wheels.yml:44


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread pyproject.toml Resolved
Comment thread pyproject.toml Resolved
Comment thread .github/workflows/testing.yml Resolved
with:
target: ${{ matrix.target }}
args: --release --out dist -i python3.10 python3.11 python3.12 python3.13 --manifest-path crates/openpiv_rust/Cargo.toml
args: --release --out dist -i python3.11 python3.12 python3.13 python3.14 --manifest-path crates/openpiv_rust/Cargo.toml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Rust extra lacks platform wheels

When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce cp312-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.

Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.

Prompt for AI agents
In `.github/workflows/wheels.yml` at line 44:

**Rust extra lacks platform wheels**

When a user on Windows or macOS installs the optional Rust extra with Python 3.11, 3.13, or 3.14, the Windows and macOS Maturin jobs still build only for Python 3.12. Because the extension does not enable PyO3’s stable ABI, those jobs produce `cp312`-only wheels, leaving users on Python 3.11, 3.13, or 3.14 without an installable Rust extra on those platforms.

Build and publish compatible Rust wheels for each supported Python version on Windows and macOS, or configure and verify stable-ABI wheels.

@sourcery-ai
sourcery-ai Bot dismissed their stale review November 14, 2026 20:50

Sourcery withdrew this approval because the latest commits introduced blocking findings.

Remove poetry.lock/setup.py, convert pyproject.toml to PEP 621 with hatchling build backend, regenerate uv.lock, and update docs/workflow instructions to use uv.
@alexlib
alexlib merged commit 8aed971 into master Nov 14, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants